package com.hl.common.constant;


import java.util.Locale;

/**
 * 通用常量信息
 *
 * @author Jimbo
 */
public class Constants {

    /*
     * 页码名称
     */
    public static final String PAGE_NUM = "pageNum";
    /*
     * 每页条目数名称
     */
    public static final String PAGE_SIZE = "pageSize";
    /*
     * 总记录名称
     */
    public static final String TOTAL = "total";
    /*
     * 总页数名称
     */
    public static final String PAGE_TOTAL = "pageTotal";
    /*
     * 每页数据名称
     */
    public static final String PAGE_LIST = "list";
    /*
     * 页码默认值
     */
    public static final String PAGE_NUM_DEFAULT = "1";
    /*
     * 每页条目数默认值
     */
    public static final String PAGE_SIZE_DEFAULT = "10";
    /*
     * 默认密码
     */
    public static final String PASSWORD_DEFAULT = "123456";

    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";


    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";


    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 所有权限标识
     */
    public static final String ALL_PERMISSION = "*:*:*";

    /**
     * 管理员角色权限标识
     */
    public static final String SUPER_ADMIN = "admin";

    /**
     * 角色权限分隔符
     */
    public static final String ROLE_DELIMETER = ",";

    /**
     * 权限标识分隔符
     */
    public static final String PERMISSION_DELIMETER = ",";

    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 2;

    /**
     * 令牌
     */
    public static final String TOKEN = "token";

    /**
     * 令牌前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * 令牌前缀
     */
    public static final String LOGIN_USER_KEY = "login_user_key";

    /**
     * 用户ID
     */
    public static final String JWT_USERID = "userid";


    /**
     * 用户头像
     */
    public static final String JWT_AVATAR = "avatar";

    /**
     * 创建时间
     */
    public static final String JWT_CREATED = "created";

    /**
     * 用户权限
     */
    public static final String JWT_AUTHORITIES = "authorities";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

}
